package com.jvyou.app.ds.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 车辆使用记录表(VehicleUsage)表实体类
 *
 * @author 橘柚
 * @since 2025-04-16 17:48:05
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("ds_vehicle_usage")
public class VehicleUsage implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * ID主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 车辆ID
     */
    @TableField("vehicle_id")
    private Long vehicleId;

    /**
     * 教练ID
     */
    @TableField("coach_id")
    private Long coachId;

    /**
     * 关联课时ID
     */
    @TableField("lesson_id")
    private Long lessonId;

    /**
     * 开始使用时间
     */
    @TableField("start_time")
    private LocalDateTime startTime;

    /**
     * 结束使用时间
     */
    @TableField("end_time")
    private LocalDateTime endTime;

    /**
     * 开始里程
     */
    @TableField("start_mileage")
    private Double startMileage;

    /**
     * 结束里程
     */
    @TableField("end_mileage")
    private Double endMileage;

    /**
     * 燃油消耗量(升)
     */
    @TableField("fuel_consumption")
    private Double fuelConsumption;

    /**
     * 使用用途(1-教学,2-考试,3-维修,4-其他)
     */
    @TableField("usage_purpose")
    private String usagePurpose;

    /**
     * 使用状态(1-正常,2-异常)
     */
    @TableField("usage_status")
    private String usageStatus;

    /**
     * 异常情况描述
     */
    @TableField("abnormal_description")
    private String abnormalDescription;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 创建人
     */
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private String createdBy;

    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(exist = false)
    private Vehicle vehicle;

    @TableField(exist = false)
    private Lesson lesson;

    /**
     * 车牌号码
     */
    @TableField(exist = false)
    private String plateNumber;
}

